package cn.base.project.exception.model;

import cn.base.project.exception.custom.BaseException;

import java.util.Map;

/**
 * Created by Linwq on 2017/12/21.
 */
public class BaseError {
    private String message;
    private String errorCode;
    private String data;
    private String id ;
    private String value;
    private String  reserve;
    private Map<String,Object> attribute;

    public BaseError() {
    }

    public BaseError(BaseException e) {
        this.message = e.getMsg();
        this.errorCode = e.getErrCode();
        this.data = e.getData();
        this.id = e.getId();
        this.value = e.getValue();
        this.reserve = e.getReserve();
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getReserve() {
        return reserve;
    }

    public Map<String, Object> getAttribute() {
        return attribute;
    }

    public void setAttribute(Map<String, Object> attribute) {
        this.attribute = attribute;
    }

    public void setReserve(String reserve) {
        this.reserve = reserve;
    }
}
